typedef HRESULT (WINAPI *TD3DXSaveSurfaceToFileW)(
  _In_  LPCTSTR pDestFile,
  _In_  D3DXIMAGE_FILEFORMAT DestFormat,
  _In_  LPDIRECT3DSURFACE9 pSrcSurface,
  _In_  const PALETTEENTRY *pSrcPalette,
  _In_  const RECT *pSrcRect
);

TD3DXSaveSurfaceToFileW OldD3DXSaveSurfaceToFileW;

DllExport HRESULT cc D3DXSaveSurfaceToFileW(
  _In_  LPCTSTR pDestFile,
  _In_  D3DXIMAGE_FILEFORMAT DestFormat,
  _In_  LPDIRECT3DSURFACE9 pSrcSurface,
  _In_  const PALETTEENTRY *pSrcPalette,
  _In_  const RECT *pSrcRect
)
{
	return OldD3DXSaveSurfaceToFileW (pDestFile, DestFormat, pSrcSurface, pSrcPalette,pSrcRect);
}
